﻿using System.Collections;
using System.Collections.Generic;

using UnityEngine;

[RequireComponent (typeof (Rigidbody2D), typeof (Animator))]
public class SpaceshipCustom : Spaceship {

	// 子弹种类
	[SerializeField]
	private BulletType bulletType = BulletType.TYPE1;

	// 子弹预制件对象
	public GameObject bullet;

	// 生成子弹
	public override void Shot (Transform origin) {
		
		// 委托BulletManager的单例对象的开火. 开火方法由 bulletType来决定
		BulletManager.instance.Shot (bulletType, origin, bullet);
	}

}
